using Storage.Core;

namespace Storage.Client
{
	internal static class IEntityExtensions
	{
		public static PlainEntity ToPlainEntity<T>(this IEntity<T> genericEntity, ISerializer<T> serializer)
		{
			return new PlainEntity(genericEntity.Id, typeof(T).ToString(), serializer.Serialize(genericEntity.Body));
		}
	}
}